package com.lsx.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.dubbo.config.annotation.Reference;
import com.lsx.service.IUserService;

@RestController
public class HomeController {

	@Reference(version="1.0.0")
	private IUserService userService;
	
	@Reference(version="2.0.0")
	private IUserService userServiceV2;
	
    @RequestMapping(value = "/")
    public String index (){
    	System.out.println(userService.getName());
    	System.out.println(userService.getUserName("张三"));
    	System.out.println("===========================================");
    	System.out.println(userServiceV2.getName());
    	System.out.println(userServiceV2.getUserName("张三"));
        return "Welcome to lsx...";
    }

}
